<template>
  <div class="header">
      <span class="iconfont icon-icon-test" v-if="back" @click="$router.back()"></span>
      <slot></slot>
  </div>
</template>
<script>
export default {
    name:"MHeader",
    props:{
        back:{
            type:Boolean,
            default:false
        }
    }
};
</script>

<style lang="scss" scoped>
.header{
    height: .8rem;
    background-color: rgb(229, 72, 71);
    color:white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    .icon-icon-test{
        position: absolute;
        left: .2rem;
    }
}
</style>